<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page isELIgnored="false" %>
<html >
<head>
    <meta charset="UTF-8">
    <title>个人信息</title>
    <style>
        .top{
            padding-top: 100px;
            padding-left: 250px;
        }
        .image{
            float: left;
            padding-left: 170px;
        }
        .right{
            float: left;
            padding-left: 300px;
        }
    </style>
    <%
        Object cls=request.getSession().getAttribute("cls");
        Object sf=request.getSession().getAttribute("sf");
    %>
</head>
<body>
    <h1 class="top">个人信息</h1>
    <hr/>
    <%if(sf=="student"){%>
    <c:forEach items="${stulist}" var="b">
    <div class="image">
        <c:choose>
            <c:when test="${b.stavatar==null}">
                <img src="/examproject/images/mrtx.png" style="border-radius: 150px;width:300px;height:300px;"/>
            </c:when>
            <c:otherwise>
                <img src="${b.stavatar}" style="border-radius: 150px;width:300px;height:300px;"/>
            </c:otherwise>
        </c:choose>

        <br/>
        <a href="/examproject/html/updateInfo.jsp" style="margin-left: 100px;">点击修改头像</a>
    </div>
    <div class="right">
        <h2>${b.stname}</h2>
        <font>账号ID:${b.stid}<font style="padding-left: 200px;">身份:<%=sf%><font style="padding-left: 200px;">所属班级:<%=cls%></font></font></font>
        <hr style="margin-top: 30px"/>
        <c:choose>
                <c:when test="${b.stsex==null}">
                    <h2 style="padding-top: 100px">性别:无<a href="/examproject/html/updateInfo.jsp" style="padding-left: 60px; font-size: 20px">修改</a></h2>
                </c:when>
            <c:otherwise>
                <h2 style="padding-top: 100px">性别:${b.stsex}<a href="/examproject/html/updateInfo.jsp" style="padding-left: 60px; font-size: 20px">修改</a></h2>
            </c:otherwise>
        </c:choose>
            <c:choose>
                <c:when test="${b.stphone==null}">
                    <h2 style="padding-top: 100px">电话:无<a href="/examproject/html/updateInfo.jsp" style="padding-left: 60px; font-size: 20px">修改</a></h2>
                </c:when>
                <c:otherwise>
                    <h2 style="padding-top: 100px">电话:${b.stphone}<a href="/examproject/html/updateInfo.jsp" style="padding-left: 60px; font-size: 20px">修改</a></h2>
                </c:otherwise>
            </c:choose>
            <c:choose>
                <c:when test="${b.stwx==null}">
                    <h2 style="padding-top: 100px">vx:无<a href="/examproject/html/updateInfo.jsp" style="padding-left: 60px; font-size: 20px">修改</a></h2>
                </c:when>
                <c:otherwise>
                    <h2 style="padding-top: 100px">vx:${b.stwx}<a href="/examproject/html/updateInfo.jsp" style="padding-left: 60px; font-size: 20px">修改</a></h2>
                </c:otherwise>
            </c:choose>
           <h2 style="padding-top: 30px">密码:xxx<a href="/examproject/html/updateInfo.jsp" style="padding-left: 60px; font-size: 20px">修改</a></h2>
        <button style="width: 200px; height: 100px; font-size: 30px; background-color: #0fccbc"><a href="/examproject/nologin/index.jsp">返回首页</a></button>
    </div>
    </c:forEach>
    <%}else{%>
    <c:forEach items="${stulist}" var="b">
        <div class="image">
            <c:choose>
                <c:when test="${b.thavatar==null}">
                    <img src="../images/mrtx.png" style="border-radius: 150px;width:300px;height:300px;"/>
                </c:when>
                <c:otherwise>
                    <img src="${b.thavatar}" style="border-radius: 150px;width:300px;height:300px;"/>
                </c:otherwise>
            </c:choose>

            <br/>
            <a href="/examproject/html/updateInfo.jsp" style="margin-left: 100px;">点击修改头像</a>
        </div>
        <div class="right">
            <h2>${b.tname}</h2>
            <font>账号ID:${b.teacherId}<font style="padding-left: 200px;">身份:<%=sf%><font style="padding-left: 200px;">在校职位:${b.tjob}</font></font></font>
            <hr style="margin-top: 30px"/>
            <c:choose>
                <c:when test="${b.tphone==null}">
                    <h2 style="padding-top: 100px">电话:无<a href="/examproject/html/updateInfo.jsp" style="padding-left: 60px; font-size: 20px">修改</a></h2>
                </c:when>
                <c:otherwise>
                    <h2 style="padding-top: 100px">电话:${b.tphone}<a href="/examproject/html/updateInfo.jsp" style="padding-left: 60px; font-size: 20px">修改</a></h2>
                </c:otherwise>
            </c:choose>
            <h2 style="padding-top: 30px">密码:xxx<a href="/examproject/html/updateInfo.jsp" style="padding-left: 60px; font-size: 20px">修改</a></h2>
            <button style="width: 200px; height: 100px; font-size: 30px; background-color: #0fccbc"><a href="/examproject/nologin/index.jsp">返回首页</a></button>
        </div>
    </c:forEach>
    <%}%>
</body>
</html>
